/*
   历史补传管理
   1、每个连接可以实例化一个补传管理类
   2、应用层使用只需要调用初始化，反初始化，调度函数即可
*/
#ifndef __HISTORYMANAGE_H_
#define __HISTORYMANAGE_H_



#include "log.h"
#include <map>
#include "HistoryRecord.h"

using namespace std;

class CHistoryManage
{
   public:
      CHistoryManage();
      ~CHistoryManage();
      int HistoryManageInit(string filename);
      int HistoryManageUnInit();
      int HistoryManageAdd(char *data, int datalen);
      int HistoryManageSetValid(char valid, int writeindex);
      int HistortManageGetRecord(char *data);
      
    private:
      string m_historyfilename;
      CHistoryRecord *m_historyrecord;
      HistoryFileHeader *m_historyfileheader;
};







#endif